import request from "@/api/index"

export default{
  /**
   * @description: 添加疾病记录 *代表必填
   * @param {Object} params *
   * @return {Object}
   */
   add(params){
    const url = "/health/diseaseRecord/add"
    return request.post(url,{
      homeBaseId:sessionStorage.getItem("homeBaseId"),
      homeBaseType:sessionStorage.getItem("homeBaseType"),
      ...params
    })
  },
  /**
   * @description: 编辑疾病记录 *代表必填
   * @param {Object} params *
   * @return {Object}
   */
   edit(params){
    const url = "/health/diseaseRecord/edit"
    return request.post(url,{
      homeBaseId:sessionStorage.getItem("homeBaseId"),
      homeBaseType:sessionStorage.getItem("homeBaseType"),
      ...params
    })
  },
  /**
   * @description: 完成 *代表必填
   * @param {Object} diseaseRecordId *
   * @param {Object} completeTime	 *
   * @return {Object}
   */
  complete(params){
    const url = "/health/diseaseRecord/complete"
    return request.post(url,{
      homeBaseId:sessionStorage.getItem("homeBaseId"),
      ...params
    })
  },
  /**
   * @description: 批量删除疾病记录 *代表必填
   * @param {String/Number} id *
   * @return {Object}
   */
  delListById(params){
    const url = "/health/diseaseRecord/delListById"
    return request.get(url,params)
  },
  /**
   * @description: 单个删除疾病记录 *代表必填
   * @param {String/Number} id *
   * @return {Object}
   */
   delById(params){
    const url = "/health/diseaseRecord/delById"
    return request.get(url,params)
  },
  /**
   * @description: 条件查询 *代表必填
   * @param {Object} params *
   * @return {Object}
   */
  queryByCondition(params){
    const url = "/health/diseaseRecord/queryByCondition"
    return request.post(url,{
      homeBaseId:sessionStorage.getItem("homeBaseId"),
      homeBaseType:sessionStorage.getItem("homeBaseType"),
      ...params
    })
  },
  /**
   * @description: 分页查询疾病记录 *代表必填
   * @param {Object} params *
   * @param {String/Number} page *
   * @param {String/Number} size *
   * @return {Object}
   */
   queryPageByCondition(params){
    const url = "/health/diseaseRecord/queryPageByCondition"
    return request.post(url,{
      homeBaseId:sessionStorage.getItem("homeBaseId"),
      homeBaseType:sessionStorage.getItem("homeBaseType"),
      ...params
    })
   },
}
